<?php
	include_once "module_db.php";
	
	class module_bs
	{
		//--------------Field---------------
		private $MaModule = 0;
		public function SetMaModule($MaModule)           { $this->MaModule = $MaModule;           }
		public function GetMaModule()                    { return $this->MaModule;                }
		
		private $TenModule = "";
		public function SetTenModule($TenModule)         { $this->TenModule = $TenModule;         }
		public function GetTenModule()                   { return $this->TenModule;               }
		
		private $MoTa = "";
		public function SetMoTa($MoTa)                   { $this->MoTa = $MoTa;                   }
		public function GetMoTa()                        { return $this->MoTa;                    }
		
		private $TenFile = "";
		public function SetTenFile($TenFile)             { $this->TenFile = $TenFile;             }
		public function GetTenFile()                     { return $this->TenFile;                 }
		
		private $TrangThai = -1;
		public function SetTrangThai($TrangThai)         { $this->TrangThai = $TrangThai;         }
		public function GetTrangThai()                   { return $this->TrangThai;               }
		
		private $Index = -1;
		public function SetIndex($Index)                 { $this->Index = $Index;                 }
		public function GetIndex()                       { return $this->Index;                   }
		
		private $PIN = "";
		public function SetPIN($PIN)                     { $this->PIN = $PIN;                     }
		public function GetPIN()                         { return $PIN->PIN;                      }
		
		//--------------Method---------------
		public function Them()
		{
			$data = new module_db();
			return $data->Them($this->TenModule, $this->MoTa, $this->TenFile, $this->TrangThai, $this->Index, $this->PIN);
		}
		
		public function CapNhat()
		{
			$data = new module_db();
			return $data->CapNhat($this->MaModule, $this->TenModule, $this->MoTa, $this->TenFile, $this->TrangThai, $this->Index, $this->PIN);
		}
		
		public function CapNhatPIN()
		{
			$data = new module_db();
			return $data->CapNhatPIN($this->MaModule, $this->PIN);
		}
		
		public function CapNhatTrangThai()
		{
			$data = new module_db();
			return $data->CapNhatTrangThai($this->MaModule, $this->TrangThai);
		}
		
		public function Xoa()
		{
			$data = new module_db();
			return $data->Xoa($this->MaModule);
		}
		
		public function LayDanhSach()
		{
			$data = new module_db();
			return $data->LayDanhSach($this->MaModule, $this->TrangThai, $this->Index);
		}
		
		public function MaxIndex()
		{
			$data = new module_db();
			return $data->MaxIndex();
		}
		public function MinIndex()
		{
			$data = new module_db();
			return $data->MinIndex();
		}
		public function CapNhatIndex()
		{
			$data = new module_db();
			return $data->CapNhatIndex($this->MaModule, $this->Index);
		}
	}
?>